_____________________________________________
- PARAMETERS - (interface)

makeMap					( instanceName, target_mc, depth, width, height )
drawCompactObj	( mapData_obj )
drawLargeObj		( mapData_obj )
drawObj					( mapData_obj )
load						( fileName )
loadChipset			( fileName )
onLoad					( - )
reset						( width, height )
scroll					( x, y, screenWidth, screenHeight, smoothness )
setTile					( x, y, id, layer )
addCollisionMethods		( collision_array )



_____________________________________________
- VARIABLES & FUNCTIONS -

_x
_y
chipset_pic
collision_array
height
width
layer#_mc
layer#_pic
load_xml				(... should be temporary, but isn't)

loadData				(temporary)
loadMap_mc			(temporary)
load_mc					(temporary)
loader					(temprary)

makeMap()				(constructor)
drawCompactObj()
drawLargeObj()
drawObj()
load()
loadChipset()		(NOT used by the map system internally.  Only used by outside code)
onLoad()				(externally defined callback)
reset()
scroll()
setTile()
addCollisionMethods()		Appends externally-#included collision methods to collision_array each time the map is created, reset, or drawn.



_____________________________________________
- FUNCTION EFFECTS -

makeMap					( instanceName, target_mc, depth, width, height )
	Creates a movieClip to become teh map system
	Sets width, height  (default:  20, 15)
	Initializes chipset_pic to a 480x256 blank bitmap
	Initializes collision_array to all Zero's using the width & height
	Appends collision methods to collision_array
	Returns the map-system movieClip that was created

drawCompactObj	( mapData_obj )
	Resets the map
	Sets width & height to the values specified in mapData_obj
	Resets collision_array
	De-codes & sets collision_array  (mapData_obj stores collision data as a wrap-around string of 1-digit base-36 encoded values)
	Appends collision methods to collision_array
	Blanks the existing chipset to a transparent 480x256 bitmap
	Loads the chipset image specified by mapData_obj, first by linkage, then by file loading & draw()
	De-codes & draws all tiles  (mapData_obj stores tile data as a wrap-around string of 2-digit base-36 encoded values)
	Calls onLoad() callback hook

drawLargeObj		( mapData_obj )
	Resets the map
	Sets width & height to the values specified in mapData_obj
	Resets collision_array
	Sets collision_array  (values are read as-is from mapData_obj's 2d-array)
	Appends collision methods to collision_array
	Blanks the existing chipset to a transparent 480x256 bitmap
	Loads the chipset image specified by mapData_obj, first by linkage, then by file loading & draw()
	Draws all tiles  (mapData_obj stores tile data as-is as a 2d-array)
	Calls onLoad() callback hook

drawObj					( mapData_obj )
	Checks format of mapData_obj
	2 = drawCompactObj()
	Else = drawLargeObj()

load						( fileName )
	Loads map XML file, first using linkage, then by loading a file
	Converts XML to flash data
	draws the map

loadChipset			( fileName )
	Blanks the existing chipset to a transparent 480x256 bitmap
	Loads the specified chipset image, first by linkage, then by file loading
	Clones the loaded image
	Calls onLoad() callback hook

onLoad					( - )
	Called after load(),  drawObj(),  or loadChipset()

reset						( width, height )
	Removes all layer#_mc movieClips
	Removes all layer#_pic bitmap's
	Optionally resets  width, height  to specified values / retains current values
	Clears chipset_pic to a 480,256 blank bitmap
	Re-initializes collision_array to all Zero's
	Re-#includes collision methods by calling:  addCollisionMethods( collision_array )

scroll					( x, y, screenWidth, screenHeight, smoothness )
	If x,y are omitted, the player's _x and _y are used
	If screenWidth or screenHeight are omitted,  320 and 240 are used.
	If smoothness is omitted, 1 is used.
	Determines intended centered map position based on x,y... but limits the coords to center next to map edges
	Adds target-coords*smoothness to current coords  OR  centers the map if it's too small
	Applies floor() to resulting coords to prevent "floating" sprites

setTile					( x, y, id, layer )
	If layer is omitted, defaults to layer 0
	Decodes the "id" chipset value into x,y  ("id" is a wrap-around index, and assumes that the chipset is 30 tiles wide)
	Creates the layer if necessary
	Copies the chipset tile to the layer's bitmap
